<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>添加/编辑枚举 - Powered By ${systemConfig.systemName}</title>
<meta name="Author" content="webmall Team" />
<meta name="Copyright" content="webmall" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<#include "/WEB-INF/template/common/include.ftl">
<link href="${base}/template/admin/css/input.css" rel="stylesheet" type="text/css" />
<script>
$().ready( function() {
     
    $(".addProof").click(function() {
		addProofFile('pv');
	});
});
    function addProofFile(id)
    {
        var trcomp='<tr><td><input type="hidden" name="ids" value="" /><input type="text" name="lables" class="formText {required: true}" value="${(list.lable)!}" />&nbsp;<input type="text" name="values" class="formText {required: true}" value="${(list.value)!}" /></td></tr>';
     	$("#"+id+" tr:last-child").before(trcomp);
    }
</script>

<#if !id??>
	<#assign isAdd = true />
<#else>
	<#assign isEdit = true />
</#if>
</head>
<body class="input">
	<div class="body">
		<div class="inputBar">
			<h1><span class="icon">&nbsp;</span><#if isAdd??>添加枚举<#else>编辑枚举</#if></h1>
		</div>
		<form id="inputForm" class="validate" action="<#if isAdd??>properties!save.action<#else>properties!update.action</#if>" method="post">
			<input type="hidden" name="id" value="${id}" />
			<table class="inputTable">
				<tr>
					<th>
						枚举名称:
					</th>
					<td>
						<input type="text" name="properties.enumLable" class="formText {required: true}" value="${(properties.enumLable)!}" />
						<label class="requireField">*</label>
					</td>
				</tr>
                <tr>
					<th>
						枚举值:
					</th>
					<td>
                        <table id='pv' class="inputTable">
                             <#if properties != null >
                             <#list properties.propertiesValueList as list>
	                             <tr>
	                                 <td>
                                        <input type="hidden" name="ids" value="${(list.id)!}" />
										<input type="text" name="lables" class="formText {required: true}" value="${(list.lable)!}" />&nbsp;
                                        <input type="text" name="values" class="formText {required: true}" value="${(list.value)!}" />
		                			</td>
	                             </tr>
                             </#list>
                             </#if>
	                         <tr height="50">
	               				 <td>
	                   				 <div class="btn_yellow addProof" style="float:right;text-align:center;">添加</div>
	                			</td>
	            			</tr> 
						 </table>
					</td>
				</tr>
				<tr>
					<th>
						&nbsp;
					</th>
					<td>
						<input type="submit" class="formButton" value="确  定" hidefocus="true" />&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="button" class="formButton" onclick="window.history.back(); return false;" value="返  回" hidefocus="true" />
					</td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>